/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cw.server;

import cw.entity.GameResult;
import cw.entity.Level;
import cw.entity.Puzzle;
import cw.entity.PuzzleSize;
import cw.entity.Question;
import cw.entity.Subject;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

/**
 *
 * @author VinhTC
 */
public interface ServerInterface extends Remote {

    public boolean login(String username, String pass) throws RemoteException;

    public String decrypt(String str) throws RemoteException;

    public String encrypt(String str) throws RemoteException;

    public Puzzle getPuzzleRandom(int levelId, int sizeId, int subjectId) throws RemoteException;

    public Puzzle findPuzzleById(int puzzleId) throws RemoteException;

    public Level getLevelById(int levelId) throws RemoteException;

    public Subject getSubjectById(int sbjId) throws RemoteException;

    public Level getLevelByName(String levelName) throws RemoteException;

    public Puzzle findPuzzleByName(String puzzleName) throws RemoteException;

    public Subject getSubjectByName(String sbjName) throws RemoteException;

    public List<Question> getQuestionByPuzzleId(int puzzleId) throws RemoteException;

    public Question getQuestionByQuestionContent(String quest) throws RemoteException;

    public List<GameResult> getHightScores(int sizeId) throws RemoteException;

    public List<Subject> getAllSubject() throws RemoteException;

    public List<cw.entity.Level> getAllLevel() throws RemoteException;

    public List<PuzzleSize> getAllPuzzleSize() throws RemoteException;

    public PuzzleSize getSizeByName(String sizeName) throws RemoteException;

    public boolean addResult(GameResult result) throws RemoteException;
}
